<app-back-btn></app-back-btn>
<div class="page-title">
  <span class="title" *ngIf="!this.code">添加TestOption</span>
  <span class="title" *ngIf="this.code">修改TestOption</span>
</div>

<div class="panel panel-body">
  <form nz-form [formGroup]="validateForm" class="form-wrap" (submit)="addTestOption($event)">
    <h2 class="subtitle">TestOption信息</h2>

    <!--sampleCode start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="sampleCode" nzRequired> 样品编码</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('sampleCode')">
        <input nz-input formControlName="sampleCode" type="text" id="sampleCode" placeholder="样品编码">
        <nz-form-explain *ngIf="getFormControl('sampleCode').dirty&&getFormControl('sampleCode').errors">
          <ng-container *ngIf="getFormControl('sampleCode').hasError('required')">请输入样品编码</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        样品编码
      </nz-form-control>
    </nz-form-item>

    <!--option start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="option" nzRequired> 测试项</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('option')">
        <input nz-input formControlName="option" type="text" id="option" placeholder="测试项">
        <nz-form-explain *ngIf="getFormControl('option').dirty&&getFormControl('option').errors">
          <ng-container *ngIf="getFormControl('option').hasError('required')">请输入测试项</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        测试项
      </nz-form-control>
    </nz-form-item>

    <!--sort start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="sort" nzRequired> 测试排序</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('sort')">
        <input nz-input formControlName="sort" type="text" id="sort" placeholder="测试排序">
        <nz-form-explain *ngIf="getFormControl('sort').dirty&&getFormControl('sort').errors">
          <ng-container *ngIf="getFormControl('sort').hasError('required')">请输入测试排序</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        测试排序
      </nz-form-control>
    </nz-form-item>

    <!--ver start-->
    <nz-form-item>
      <nz-form-label [nzSm]="7" nzFor="ver" nzRequired> 版本</nz-form-label>
      <nz-form-control [nzSm]="10" [nzValidateStatus]="getFormControl('ver')">
        <input nz-input formControlName="ver" type="text" id="ver" placeholder="版本">
        <nz-form-explain *ngIf="getFormControl('ver').dirty&&getFormControl('ver').errors">
          <ng-container *ngIf="getFormControl('ver').hasError('required')">请输入版本</ng-container>
        </nz-form-explain>
      </nz-form-control>
      <nz-form-control [nzSm]="7" class="font12 pl color-gray">
        版本
      </nz-form-control>
    </nz-form-item>

    <!--表单底部start-->
    <nz-form-item class="action-button">
      <nz-form-control class="text-center">
        <button nz-button nzSize="large" [nzType]="'primary'" class="pl-30 pr-30" [nzLoading]="isConfirmLoading">
          {{'Btn0009'| translate}}
        </button>
      </nz-form-control>
    </nz-form-item>
    <!--表单底部end-->
  </form>

</div>
